# 加载所有源文件， 和makefile wildcard类似
# 见 https://cmake.org/cmake/help/latest/command/aux_source_directory.html
# 语法： AUX_SOURCE_DIRECTORY(<dir> <variable>)
AUX_SOURCE_DIRECTORY(. DIR_SRCS)

# SET(DIR_SRCS ${DIR_SRCS} dir1.c) --- IGNORE ---

# 默认是静态库
# 生成动态库： ADD_LIBRARY(<name> SHARED|MODULE <srcs>...)
# 生成静态库： ADD_LIBRARY(<name> STATIC <srcs>...)
# ADD_LIBRARY(dir1 SHARED ${DIR_SRCS})
ADD_LIBRARY(dir1 ${DIR_SRCS})